package com.cskaoyan.servlet;

import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.vo.Dashboard;
import com.cskaoyan.service.DashboardService;
import com.cskaoyan.service.DashboardServiceimpl;
import com.cskaoyan.util.AuthenticationUtil;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author Ramsey
 * @date 2023年05月29日 11:54
 */
@WebServlet("/admin/*")
public class AdminDashboardServlet extends WdBaseServlet {
    DashboardService dashboardService = new DashboardServiceimpl();

    public BaseRespVo dashboard(HttpServletRequest request, HttpServletResponse response) {
        System.out.println("进入了首页");
        Dashboard dashboard = dashboardService.count();
        return BaseRespVo.ok(dashboard);
    }
}
